FROM eclipse-temurin:8-jre-jammy
LABEL maintainer="chenxk@sonoscape.net,lugc@sonoscape.net"
ENV TZ=Asia/Shanghai \
    JAVA_OPTS="-Xms512m -Xmx512m -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1024m -Dspring.config.location=/app/config/bootstrap.yml -Dfile.encoding=utf-8" \
    APP_NAME=case-biz \
    JAR_NAME=case.jar
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /app
EXPOSE 8003
COPY ./$APP_NAME/src/main/resources/bootstrap.yml ./config/bootstrap.yml
COPY ./$APP_NAME/target/$JAR_NAME .
CMD ["sh", "-c", "java $JAVA_OPTS -jar $JAR_NAME"]